<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>维修列表</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<link rel="stylesheet" type="text/css"
	href="H-ui.admin/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css"
	href="H-ui.admin/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css"
	href="H-ui.admin/lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css"
	href="H-ui.admin/static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css"
	href="H-ui.admin/static/h-ui.admin/css/style.css" />
<script type="text/javascript"
	src="H-ui.admin/lib/DD_belatedPNG_0.0.8a-min.js"></script>
<script>
	DD_belatedPNG.fix('*');
</script>
</head>

<body>
	<nav class="breadcrumb">
	<i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>
	维修管理 <span class="c-gray en">&gt;</span> 维修列表 <a
		class="btn btn-success radius r"
		style="line-height:1.6em;margin-top:3px"><i class="Hui-iconfont">&#xe68f;</i>
	</a></nav>
	<div class="page-container">
		<form method="post" action="maintainActionfindAppoint.action?pageNo=1">
			<div class="text-c">
				<span class="select-box inline"> <select name="city"
					class="select">
						<option value="0">全部分类</option>
						<option value="1">已提交</option>
						<option value="2">待审核</option>
						<option value="3">已维修</option>
						<option value="4">已打回</option>
				</select> </span> 日期范围： <input type="text" name="sywMaintain.begidate"
					onfocus="WdatePicker({ maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}' })"
					id="datemin" class="input-text Wdate" style="width:120px;">
				- <input type="text" name="sywMaintain.enddate"
					onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'datemin\')}',maxDate:'%y-%M-%d' })"
					id="datemax" class="input-text Wdate" style="width:120px;">
				<button name="" id="" class="btn btn-success" type="submit">
					<i class="Hui-iconfont"></i> 搜索
				</button>
			</div>
		</form>
		<s:if test= '#session.user1.sywRole.name!="值班经理" '>
		<div class="cl pd-5 bg-1 bk-gray mt-20">
			<span class="l"> <a class="btn btn-primary radius"
				data-title="添加维修单" href="H-ui.admin/Maintain/MaintainAdd.jsp"><i
					class="Hui-iconfont"></i> 添加维修单</a> </span>
		</div>
		</s:if>
		<div class="mt-20">
			<table
				class="table table-border table-bordered table-hover table-bg table-sort">
				<thead>
					<tr class="text-c" role="row">
						<th width="25" class="sorting_disabled" rowspan="1" colspan="1"
							aria-label="" style="width: 25px;"></th>
						<th width="80" class="sorting_desc"
							aria-controls="DataTables_Table_0" rowspan="1" colspan="1"
							aria-sort="descending" style="width: 80px;">ID</th>
						<th width="250" class="sorting" aria-controls="DataTables_Table_0"
							rowspan="1" colspan="1" style="width: 250px;">报修事由</th>
						<th width="80" class="sorting" aria-controls="DataTables_Table_0"
							rowspan="1" colspan="1" style="width: 80px;">报修部门</th>
						<th width="80" class="sorting" aria-controls="DataTables_Table_0"
							rowspan="1" colspan="1" style="width: 80px;">报修人</th>
						<th width="120" class="sorting" aria-controls="DataTables_Table_0"
							rowspan="1" colspan="1" style="width: 120px;">报修时间</th>
						<th width="120" class="sorting" aria-controls="DataTables_Table_0"
							rowspan="1" colspan="1" style="width: 120px;">维修完成时间</th>
						<th width="60" class="sorting" aria-controls="DataTables_Table_0"
							rowspan="1" colspan="1" style="width: 60px;">维修状态</th>
						<th width="120" class="sorting_disabled" rowspan="1" colspan="1"
							style="width: 120px;">操作</th>
					</tr>
				</thead>
				<tbody>
					<s:iterator value="ps.items"  var="main" id="main">
						<tr class="text-c odd" role="row">
							<td><input type="checkbox" value="" name=""></td>
							<td class="sorting_1"><s:property value="#main.id" /></td>
							<td class="text-l"><s:property value="#main.event" /></td>
							<td><s:property value="#main.sywDept.name" /></td>
							<td><s:property value="#main.sywUser.sywRole.name" /></td>
							<td><s:date name="#main.begidate" format="yyyy-MM-dd" />
							</td>
							<td><s:date name="#main.enddate" format="yyyy-MM-dd" />
							</td>
							<td class="td-status"><span
								class="label label-success radius"><s:property
										value="#main.sywMaintainstate.name" /> </span></td>
							<td class="f-14 td-manage">
							<s:if test='#session.user1.sywRole.name!="维修管理员" && #session.user1.sywRole.name!="值班经理" '>
							<s:if test="#main.sywMaintainstate.name=='待审核'">
									<a href="maintainActionupdateMaintain?sywMaintain.id=<s:property value="#main.id" />">审核
									</a>
								</s:if> </s:if><s:if test='#session.user1.sywRole.name=="维修管理员" '>
									<s:if test='#main.sywMaintainstate.name=="已提交"'>
										<a style="text-decoration:none" class="ml-5"
											href="maintainActionupdateMaintains?sywMaintain.id=<s:property value="#main.id" />"
											title="开始维修"><i class="Hui-iconfont"></i> </a>
									</s:if>
								</s:if></td>
						</tr>
					</s:iterator>
				</tbody>
			</table>
			<table>
				<tr>
					<td colspan="7" align="center"><c:import
							url="/H-ui.admin/Maintain/rollPage.jsp" charEncoding="UTF-8">
							<c:param name="formName" value="document.forms[0]" />
							<c:param name="totalRecordCount" value="${ps.totalCount}" />
							<c:param name="totalPageCount" value="${ps.totalPageCount}" />
							<c:param name="currentPageNo" value="${ps.currPageNo}" />
						</c:import></td>
				</tr>
			</table>
		</div>
	</div>
	<!--_footer 作为公共模版分离出去-->
	<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
	<script type="text/javascript" src="static/h-ui/js/H-ui.min.js"></script>
	<script type="text/javascript" src="static/h-ui.admin/js/H-ui.admin.js"></script>
	<!--/_footer 作为公共模版分离出去-->

	<!--请在下方写此页面业务相关的脚本-->

	<script type="text/javascript"
		src="${pageContext.request.contextPath}/H-ui.admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
	<script type="text/javascript"
		src="H-ui.admin/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
	<script type="text/javascript"
		src="H-ui.admin/lib/laypage/1.2/laypage.js"></script>
	<script type="text/javascript">
		$('.table-sort').dataTable({
			"aaSorting" : [ [ 1, "desc" ] ],//默认第几个排序
			"bStateSave" : true,//状态保存
			"pading" : false,
			"aoColumnDefs" : [
			//{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
			{
				"orderable" : false,
				"aTargets" : [ 0, 8 ]
			} // 不参与排序的列
			]
		});
	</script>
</body>
</html>
